package com.xu.mode.decoration;

/**
 * 装饰者模式的掩饰代码
 * 装饰者模式就在当前对象已有的基础上进行增强
 */
public class Test {
    public static void main(String[] args) {
        ConcreteComponent t = new ConcreteComponent();
        ConcreteComponentA a = new ConcreteComponentA();
        ConcreteComponentB b = new ConcreteComponentB();
        a.setComponent(t);
        b.setComponent(a);
        b.Opertion();
    }
}
